# -*- coding: utf-8 -*-
from app.device.models import DevicesAttr
from dvadmin.utils.serializers import CustomModelSerializer
from dvadmin.utils.viewset import CustomModelViewSet


class DevicesAttrSerializer(CustomModelSerializer):
    """
    序列化器
    """

    class Meta:
        model = DevicesAttr
        fields = "__all__"
        read_only_fields = ["id"]


class DevicesAttrViewSet(CustomModelViewSet):
    """
    设备扩充属性接口
    list:设备扩充属性查询
    create:设备扩充属性新增
    update:设备扩充属性修改
    retrieve:设备扩充属性单例
    destroy:设备扩充属性删除
    multiple_delete:设备扩充属性多删
    """
    queryset = DevicesAttr.objects.all()
    serializer_class = DevicesAttrSerializer
    # filter_fields = ['creator_id']

    # permission_classes = []
